package demo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;

import java.io.Serializable;

public class Student implements Serializable {


    public  Student(){
        System.out.printf("创建学生对象");

    }
    @Override
    public  String toString(){

        return "abc";
    }

    @Bean
    @Lazy
    public Student student(){
        return new Student();
    }
}
